package top.z.work.module.system.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

import java.io.Serial;

/**
 * 系统路由 表定义层。
 *
 * @author zaoangod
 * @since 2024-07-25
 */
public class SystemRouteTableDef extends TableDef {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 系统路由
     */
    public static final SystemRouteTableDef SYSTEM_ROUTE = new SystemRouteTableDef();

    /**
     * 菜单图标
     */
    public final QueryColumn ICON = new QueryColumn(this, "icon");

    /**
     * 菜单名称
     */
    public final QueryColumn NAME = new QueryColumn(this, "name");

    /**
     * 路由地址
     */
    public final QueryColumn PATH = new QueryColumn(this, "path");

    /**
     * 菜单排序
     */
    public final QueryColumn SORT = new QueryColumn(this, "sort");

    /**
     * 菜单类型(1.目录;2.菜单;3.按钮)
     */
    public final QueryColumn TYPE = new QueryColumn(this, "type");

    /**
     * 上级菜单
     */
    public final QueryColumn PARENT = new QueryColumn(this, "parent");

    /**
     * 数据状态(0.正常;1.停用)
     */
    public final QueryColumn STATUS = new QueryColumn(this, "status");

    /**
     * 创建人
     */
    public final QueryColumn CREATOR = new QueryColumn(this, "creator");

    /**
     * 更新人
     */
    public final QueryColumn UPDATER = new QueryColumn(this, "updater");

    /**
     * 显示状态(只有1.目录;2.菜单使用)
     */
    public final QueryColumn VISIBLE = new QueryColumn(this, "visible");

    /**
     * 菜单主键
     */
    public final QueryColumn IDENTITY = new QueryColumn(this, "identity");

    /**
     * 权限标识
     */
    public final QueryColumn AUTHORITY = new QueryColumn(this, "authority");

    /**
     * 页面组件
     */
    public final QueryColumn COMPONENT = new QueryColumn(this, "component");

    /**
     * 创建时间
     */
    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 更新时间
     */
    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{IDENTITY, PARENT, NAME, ICON, AUTHORITY, PATH, COMPONENT, TYPE, SORT, VISIBLE, STATUS, CREATOR, CREATE_TIME, UPDATER, UPDATE_TIME};

    public SystemRouteTableDef() {
        super("", "system_route");
    }

}
